#ifndef GAMELOGIC_H
#define GAMELOGIC_H

#include <QObject>
#include "stdshared.h"

class Gamelogic : public QObject
{
    Q_OBJECT
public:
    explicit Gamelogic(QObject *parent = nullptr);

    /* 判断角色是否获胜 */
    bool CheckIsCount(int row,int col,Role role,int num);

    /* 设置棋盘 */
    void setQipanBoard(Role ** board,int boardSize);


    bool Prevent(int num);

    bool Attack(int num);

    bool AIMakeMove();

    /* 人机移动 */
    void computerMove();


private:
    /* 评估该点对玩家的值*/
    int evaluateMove(int row,int col,Role role);


signals:
    void Aiposition(int row,int col);
public slots:

private:
    Role ** m_board;
    int m_boardSize;


};

#endif // GAMELOGIC_H
